package com.us.usws.model.domain;

import java.util.List;

import org.apache.commons.lang3.StringUtils;

import com.us.usws.model.domain.system.Student;
import com.us.usws.model.flat.DOMeeting;

public class Meeting extends DOMeeting {

	private String statusName;
	private String typeName;
	private String serverTypeName;
	private String videoTypeName;
	private String createByName;
	private String lastUpdByName;
	private String presenterName;

	private List<Student> attendees;

	private String host;

	public String getConfRoomId() {
		if (getRoomId() == null) {
			return null;
		}
		return "conf" + StringUtils.leftPad(getRoomId().toString(), 4, '0');
	}

	public int getSpentHours() {
		int durationMin = (int) ((getEndDate().getTime() - getStartDate().getTime()) / 1000 / 60);
		return durationMin / 60;
	}

	public int getSpentMinutes() {
		int durationMin = (int) ((getEndDate().getTime() - getStartDate().getTime()) / 1000 / 60);
		return durationMin % 60;
	}

	public String getStatusName() {
		return statusName;
	}

	public void setStatusName(String statusName) {
		this.statusName = statusName;
	}

	public String getTypeName() {
		return typeName;
	}

	public void setTypeName(String typeName) {
		this.typeName = typeName;
	}

	public String getVideoTypeName() {
		return videoTypeName;
	}

	public void setVideoTypeName(String videoTypeName) {
		this.videoTypeName = videoTypeName;
	}

	public String getCreateByName() {
		return createByName;
	}

	public void setCreateByName(String createByName) {
		this.createByName = createByName;
	}

	public String getLastUpdByName() {
		return lastUpdByName;
	}

	public void setLastUpdByName(String lastUpdByName) {
		this.lastUpdByName = lastUpdByName;
	}

	public String getPresenterName() {
		return presenterName;
	}

	public void setPresenterName(String presenterName) {
		this.presenterName = presenterName;
	}

	public String getHost() {
		return host;
	}

	public void setHost(String host) {
		this.host = host;
	}

	public String getServerTypeName() {
		return serverTypeName;
	}

	public void setServerTypeName(String serverTypeName) {
		this.serverTypeName = serverTypeName;
	}

	public List<Student> getAttendees() {
		return attendees;
	}

	public void setAttendees(List<Student> attendees) {
		this.attendees = attendees;
	}

}
